projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b3c7c7
)
* lisp/emacs-lisp/comp-cstr.el (comp-cstr): Better `comp-type-to-cstr'.
author
Andrea Corallo
<akrl@sdf.org>
Tue, 29 Dec 2020 10:39:04 +0000
(11:39 +0100)
committer
Andrea Corallo
<akrl@sdf.org>
Tue, 29 Dec 2020 13:46:23 +0000
(14:46 +0100)
lisp/emacs-lisp/comp-cstr.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/comp-cstr.el
b/lisp/emacs-lisp/comp-cstr.el
index 57d93912d2f05e58b20960385ec864f8eae2dcf7..8a8e22e030d49afeb51bf20138120c05d6006b8d 100644
(file)
--- a/
lisp/emacs-lisp/comp-cstr.el
+++ b/
lisp/emacs-lisp/comp-cstr.el
@@
-49,7
+49,16
@@
"Likewise like `cl--all-builtin-types' but with t as common supertype.")
(cl-defstruct (comp-cstr (:constructor comp-type-to-cstr
- (type &aux (typeset (list type))))
+ (type &aux
+ (null (eq type 'null))
+ (integer (eq type 'integer))
+ (typeset (if (or null integer)
+ nil
+ (list type)))
+ (valset (when null
+ '(nil)))
+ (range (when integer
+ '((- . +))))))
(:constructor comp-value-to-cstr
(value &aux
(valset (list value))